/*
 *
 * Copyright (c) 2001-2018 泛微软件.
 * 泛微协同商务系统,版权所有.
 * 
 */
package com.engine.demo.service.impl;

import com.engine.core.impl.Service;
import com.engine.demo.cmd.DoAddDemoCmd;
import com.engine.demo.cmd.DoChangeDemoStatus;
import com.engine.demo.cmd.DoDeleteDemoCmd;
import com.engine.demo.cmd.DoFormDemoCmd;
import com.engine.demo.cmd.DoQueryDemoByID;
import com.engine.demo.cmd.DoQueryDemoCmd;
import com.engine.demo.cmd.DoSearchDemoCondition;
import com.engine.demo.cmd.DoTestCmd;
import com.engine.demo.cmd.DoUpdateDemoCmd;
import com.engine.demo.service.DemoService;

import weaver.hrm.User;

import java.util.Map;


public class DemoServiceImpl extends Service implements DemoService {

    @Override
    public Map<String, Object> queryList(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DoQueryDemoCmd(params,user));
    }

    @Override
    public Map<String, Object> queryById(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DoQueryDemoByID(params,user));
    }

    @Override
    public Map<String, Object> update(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DoUpdateDemoCmd(params,user));
    }

    @Override
    public Map<String, Object> add(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DoAddDemoCmd(params,user));
    }

    @Override
    public Map<String, Object> delete(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DoDeleteDemoCmd(params,user));
    }

    @Override
    public Map<String, Object> changeStatus(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DoChangeDemoStatus(params,user));
    }

    @Override
    public Map<String, Object> getCondition(Map<String, Object> params, User user) {
        return commandExecutor.execute((new DoSearchDemoCondition(params,user)));
    }

	@Override
	public Map<String, Object> getFormById(Map<String, Object> params, User user) {
		return commandExecutor.execute((new DoFormDemoCmd(params,user)));
	}
	
	@Override
	public Map<String, Object> getTest(Map<String, Object> params, User user) {
		return commandExecutor.execute((new DoTestCmd(params,user)));
	}
}
